import time

# 方法1
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.remote.switch_to import SwitchTo

# 引入action chains
from selenium.webdriver.common.action_chains import ActionChains

wd = webdriver.Chrome(service=Service(".\chromedriver_win136.exe"))

wd.get("http://www.gench.edu.cn")

time.sleep(3)
ac = ActionChains(wd)

ele = wd.find_element(By.CSS_SELECTOR, ".well")
ac.move_to_element(ele).move_by_offset(0, 10).click().perform()

time.sleep(3)
search = wd.find_element(By.CSS_SELECTOR, ".opensearch")
search1 = wd.find_element(By.CSS_SELECTOR, ".search-title")
ac.move_to_element(search).move_to_element(search1).click().send_keys(
    "作息表\n"
).perform()

time.sleep(13)
